QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets core5compat webenginecore webenginewidgets webchannel network svg


# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

unix:!mac:exists(/usr/bin/ld.gold) {
    CONFIG += use_gold_linker
}

# Enable message log in release build
DEFINES += QT_MESSAGELOGCONTEXT

TARGET = $$quote(stitch monster)
TEMPLATE = app

RC_ICONS = data/core/icons/vnote.ico
ICON = data/core/icons/vnote.icns

win32:CONFIG(release, debug|release) {
    SRC_DESTDIR = $$OUT_PWD/release
} else:win32:CONFIG(debug, debug|release) {
    SRC_DESTDIR = $$OUT_PWD/debug
} else {
    SRC_DESTDIR = $$OUT_PWD
}


SOURCES += \
    application.cpp \
    commandlineoptions.cpp \
    core/config.cpp \
    core/coreconfig.cpp \
    core/logger.cpp \
    core/mainconfig.cpp \
    core/node.cpp \
    core/sessionconfig.cpp \
    core/singleinstanceguard.cpp \
    core/stitch.cpp \
    core/theme.cpp \
    core/thememgr.cpp \
    fakeaccessible.cpp \
    main.cpp \
    task/shellexecution.cpp \
    task/task.cpp \
    task/taskmgr.cpp \
    task/taskvariable.cpp \
    utils/fileutils.cpp \
    utils/iconutils.cpp \
    utils/pathutils.cpp \
    utils/utils.cpp \
    utils/widgetutils.cpp \
    widgets/biaction.cpp \
    widgets/dockwidgethelper.cpp \
    widgets/framelessmainwindow/framelessmainwindow.cpp \
    widgets/framelessmainwindow/framelessmainwindowlinux.cpp \
    widgets/framelessmainwindow/framelessmainwindowwin.cpp \
    widgets/fullscreentoggleaction.cpp \
    widgets/labelwithbuttonswidget.cpp \
    widgets/mainwindow.cpp \
    widgets/messageboxhelper.cpp \
    widgets/navigationmode.cpp \
    widgets/navigationmodemgr.cpp \
    widgets/propertydefs.cpp \
    widgets/statusbarhelper.cpp \
    widgets/systemtrayhelper.cpp \
    widgets/titletoolbar.cpp \
    widgets/toolbarhelper.cpp \
    widgets/viewarea.cpp \
    widgets/viewsplit.cpp \
    widgets/viewwindow.cpp \
    widgets/widgetsfactory.cpp

HEADERS += \
    application.h \
    commandlineoptions.h \
    core/config.h \
    core/coreconfig.h \
    core/event.h \
    core/exception.h \
    core/fileopenparameters.h \
    core/global.h \
    core/iconfig.h \
    core/logger.h \
    core/mainconfig.h \
    core/node.h \
    core/noncopyable.h \
    core/sessionconfig.h \
    core/singleinstanceguard.h \
    core/stitch.h \
    core/theme.h \
    core/thememgr.h \
    fakeaccessible.h \
    task/shellexecution.h \
    task/task.h \
    task/taskmgr.h \
    task/taskvariable.h \
    utils/fileutils.h \
    utils/iconutils.h \
    utils/pathutils.h \
    utils/utils.h \
    utils/widgetutils.h \
    widgets/biaction.h \
    widgets/dockwidgethelper.h \
    widgets/framelessmainwindow/framelessmainwindow.h \
    widgets/framelessmainwindow/framelessmainwindowlinux.h \
    widgets/framelessmainwindow/framelessmainwindowwin.h \
    widgets/fullscreentoggleaction.h \
    widgets/labelwithbuttonswidget.h \
    widgets/mainwindow.h \
    widgets/framelessmainwindow/framelessmainwindowimpl.h \
    widgets/messageboxhelper.h \
    widgets/navigationmode.h \
    widgets/navigationmodemgr.h \
    widgets/propertydefs.h \
    widgets/statusbarhelper.h \
    widgets/systemtrayhelper.h \
    widgets/titletoolbar.h \
    widgets/toolbarhelper.h \
    widgets/viewarea.h \
    widgets/viewsplit.h \
    widgets/viewwindow.h \
    widgets/widgetsfactory.h

FORMS +=

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    data/core/core.qrc \
    data/extra/extra.qrc

TRANSLATIONS += \
    data/core/translations/vnote_zh_CN.ts \
    data/core/translations/vnote_ja.ts

RCC_BINARY_SOURCES += $$PWD/data/extra/extra.qrc

win32 {
    rcc_binary.commands = $$shell_path($$[QT_HOST_BINS]/rcc.exe) -name ${QMAKE_FILE_IN_BASE} -binary ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
    rcc_binary.depend_command = $$shell_path($$[QT_HOST_BINS]/rcc.exe) -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
} else {
    rcc_binary.commands = $$[QT_HOST_BINS]/rcc -name ${QMAKE_FILE_IN_BASE} -binary ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
    rcc_binary.depend_command = $$[QT_HOST_BINS]/rcc -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
}
rcc_binary.input = RCC_BINARY_SOURCES
rcc_binary.output = $$SRC_DESTDIR/vnote_${QMAKE_FILE_IN_BASE}.rcc
rcc_binary.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += rcc_binary
OTHER_FILES += $$RCC_BINARY_SOURCES
